<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>登录 - 进入留言板</title>
    <link rel="stylesheet" href="../css/style.css">
    <style>
        /* 与register.jsp样式类似，可复用或移至style.css */
        .form-container {
            max-width: 400px;
            margin: 50px auto;
            background: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        }
        /* 省略重复样式 */
    </style>
</head>
<body>
<div class="form-container">
    <h1 class="form-title">留言板系统用户登录</h1>

    <c:if test="${not empty requestScope.error}">
        <div class="form-error">${requestScope.error}</div>
    </c:if>

    <form action="login" method="post">
        <div class="form-group">
            <label for="username">用户名</label>
            <input type="text" id="username" name="username" placeholder="请输入用户名" required>
        </div>

        <div class="form-group">
            <label for="password">密码</label>
            <input type="password" id="password" name="password" placeholder="请输入密码" required>
        </div>

        <button type="submit" class="btn">登录系统</button>
    </form>

    <div class="form-footer">
        还没有账号？<a href="register.jsp">立即注册</a>
    </div>
</div>
</body>
</html>